package com.tang.mapper;

import com.tang.entity.Xuetang;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface XuetangMapper {
    @Select("select * from xuetang where user_id=#{currentId} and time between #{now} and #{now1}")
    List<Xuetang> getByUserIdAndTime(@Param("currentId") Long currentId, @Param("now") String now,@Param("now1") String now1);



    void record(@Param("userId")Long userId,@Param("record") Double record, @Param("now") String now);


    @Select("select * from xuetang where user_id=#{userId}")
    List<Xuetang> getByUserId(Long userId);
}
